package com.ybox.crawler.controller;

import com.ybox.common.core.web.controller.BaseController;
import com.ybox.common.core.web.domain.AjaxResult;
import com.ybox.crawler.manager.ProcessingFlowManager;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @Author ych
 * @create 2023-2023/4/14-14:03
 */
@RestController
@RequestMapping()
public class crawlerController extends BaseController {
    @Resource
    private ProcessingFlowManager processingFlowManager;


    @PostMapping
    public AjaxResult getArticleFromUrl(@RequestBody Map<String,String> map) {
        String url = map.get("url");
        processingFlowManager.CustomHandel(url);
        return AjaxResult.success();
    }
}
